<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QDomCharacterData Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QDomCharacterData Class Reference<br /><sup><sup>[<a href="qtxml.html">QtXml</a> module]</sup></sup></h1><p>The QDomCharacterData class represents a generic string in the
DOM. <a href="#details">More...</a></p>

<p>Inherits <a href="qdomnode.html">QDomNode</a>.</p><p>Inherited by <a href="qdomcomment.html">QDomComment</a> and <a href="qdomtext.html">QDomText</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qdomcharacterdata.html#QDomCharacterData">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdomcharacterdata.html#QDomCharacterData-2">__init__</a></b> (<i>self</i>, QDomCharacterData&#160;<i>x</i>)</li><li><div class="fn" /><b><a href="qdomcharacterdata.html#appendData">appendData</a></b> (<i>self</i>, QString&#160;<i>arg</i>)</li><li><div class="fn" />QString <b><a href="qdomcharacterdata.html#data">data</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdomcharacterdata.html#deleteData">deleteData</a></b> (<i>self</i>, int&#160;<i>offset</i>, int&#160;<i>count</i>)</li><li><div class="fn" /><b><a href="qdomcharacterdata.html#insertData">insertData</a></b> (<i>self</i>, int&#160;<i>offset</i>, QString&#160;<i>arg</i>)</li><li><div class="fn" />int <b><a href="qdomcharacterdata.html#length">length</a></b> (<i>self</i>)</li><li><div class="fn" />QDomNode.NodeType <b><a href="qdomcharacterdata.html#nodeType">nodeType</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdomcharacterdata.html#replaceData">replaceData</a></b> (<i>self</i>, int&#160;<i>offset</i>, int&#160;<i>count</i>, QString&#160;<i>arg</i>)</li><li><div class="fn" /><b><a href="qdomcharacterdata.html#setData">setData</a></b> (<i>self</i>, QString)</li><li><div class="fn" />QString <b><a href="qdomcharacterdata.html#substringData">substringData</a></b> (<i>self</i>, int&#160;<i>offset</i>, int&#160;<i>count</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QDomCharacterData class represents a generic string in the
DOM.</p>
<p>Character data as used in XML specifies a generic data string.
More specialized versions of this class are <a href="qdomtext.html">QDomText</a>, <a href="qdomcomment.html">QDomComment</a> and <a href="qdomcdatasection.html">QDomCDATASection</a>.</p>
<p>The data string is set with <a href="qdomcharacterdata.html#setData">setData</a>() and retrieved with
<a href="qdomcharacterdata.html#data">data</a>(). You can retrieve
a portion of the data string using <a href="qdomcharacterdata.html#substringData">substringData</a>(). Extra
data can be appended with <a href="qdomcharacterdata.html#appendData">appendData</a>(), or inserted
with <a href="qdomcharacterdata.html#insertData">insertData</a>().
Portions of the data string can be deleted with <a href="qdomcharacterdata.html#deleteData">deleteData</a>() or replaced
with <a href="qdomcharacterdata.html#replaceData">replaceData</a>(). The length
of the data string is returned by <a href="qdomcharacterdata.html#length">length</a>().</p>
<p>The node type of the node containing this character data is
returned by <a href="qdomcharacterdata.html#nodeType">nodeType</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QDomCharacterData" />QDomCharacterData.__init__ (<i>self</i>)</h3><p>Constructs an empty character data object.</p>


<h3 class="fn"><a name="QDomCharacterData-2" />QDomCharacterData.__init__ (<i>self</i>, <a href="qdomcharacterdata.html">QDomCharacterData</a>&#160;<i>x</i>)</h3><p>Constructs a copy of <i>x</i>.</p>
<p>The data of the copy is shared (shallow copy): modifying one
node will also change the other. If you want to make a deep copy,
use <a href="qdomnode.html#cloneNode">cloneNode</a>().</p>


<h3 class="fn"><a name="appendData" />QDomCharacterData.appendData (<i>self</i>, QString&#160;<i>arg</i>)</h3><p>Appends the string <i>arg</i> to the stored string.</p>


<h3 class="fn"><a name="data" />QString QDomCharacterData.data (<i>self</i>)</h3><p>Returns the string stored in this object.</p>
<p>If the node is a <a href="qdomnode.html#isNull">null node</a>,
it will return an empty string.</p>
<p><b>See also</b> <a href="qdomcharacterdata.html#setData">setData</a>().</p>


<h3 class="fn"><a name="deleteData" />QDomCharacterData.deleteData (<i>self</i>, int&#160;<i>offset</i>, int&#160;<i>count</i>)</h3><p>Deletes a substring of length <i>count</i> from position
<i>offset</i>.</p>


<h3 class="fn"><a name="insertData" />QDomCharacterData.insertData (<i>self</i>, int&#160;<i>offset</i>, QString&#160;<i>arg</i>)</h3><p>Inserts the string <i>arg</i> into the stored string at position
<i>offset</i>.</p>


<h3 class="fn"><a name="length" />int QDomCharacterData.length (<i>self</i>)</h3><p>Returns the length of the stored string.</p>


<h3 class="fn"><a name="nodeType" /><a href="qdomnode.html#NodeType-enum">QDomNode.NodeType</a> QDomCharacterData.nodeType (<i>self</i>)</h3><p>Returns the type of node this object refers to (i.e.
<tt>TextNode</tt>, <tt>CDATASectionNode</tt>, <tt>CommentNode</tt>
or <tt>CharacterDataNode</tt>). For a <a href="qdomnode.html#isNull">null node</a>, returns
<tt>CharacterDataNode</tt>.</p>


<h3 class="fn"><a name="replaceData" />QDomCharacterData.replaceData (<i>self</i>, int&#160;<i>offset</i>, int&#160;<i>count</i>, QString&#160;<i>arg</i>)</h3><p>Replaces the substring of length <i>count</i> starting at
position <i>offset</i> with the string <i>arg</i>.</p>


<h3 class="fn"><a name="setData" />QDomCharacterData.setData (<i>self</i>, QString)</h3><p>Sets this object's string to <i>v</i>.</p>
<p><b>See also</b> <a href="qdomcharacterdata.html#data">data</a>().</p>


<h3 class="fn"><a name="substringData" />QString QDomCharacterData.substringData (<i>self</i>, int&#160;<i>offset</i>, int&#160;<i>count</i>)</h3><p>Returns the substring of length <i>count</i> from position
<i>offset</i>.</p>


<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.9.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2011</td><td align="right" width="25%">Qt&#160;4.8.0</td></tr></table></div></address></body></html>